<!DOCTYPE HTML>
<html lang="en-US">
<head>
<title><?=$this->session->config->title?></title>
<meta charset="UTF-8">
<meta name="keywords" content="在不在,在不在科技,结算系统">
<meta name="description" content="在不在科技结算系统提供大量产品提供用户使用">
<link type="text/css" href="<?=base_url('puiblic/themes/css/v3/reset.css')?>" rel="stylesheet">
<link type="text/css" href="<?=base_url('public/themes/css/v3/public.css')?>" rel="stylesheet">
<link type="text/css" href="<?=base_url('public/themes/css/v3/register.css')?>" rel="stylesheet">
<script type="text/javascript" src="http://libs.baidu.com/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="<?=base_url('public/lib/jqusey.form.js')?>"></script>
<script type="text/javascript" src="<?=base_url('public/lib/layer/layer.js')?>"></script>
<link rel="shortcut icon" href="favicon.ico" />
<style>
    .loginad{
        width:580px;
        height:595px;
        position: absolute;
    }
    .loginad .loginadtitle{
        width:100%;
        text-align:center;
        line-height:60px;
        font-size:32px;
        font-family:"幼圆",Microsoft Yahei;
        margin-top:70px;
        color:#FFF;
    }
    .loginad .loginaddes{
        line-height:30px;
        color:#FFF;
        font-family:Microsoft Yahei;
        font-size:16px;
        text-align:center
    }
    .loginad .loginadimg{
        width:100%;
        height:320px;
        margin-top:40px;

    }
    .loginad .loginadbtn{ width:100%; height:40px; margin-top:30px; }
    .loginad .loginadbtn a{ display:block; width:190px; height:40px; margin:0 auto; text-align:center; line-height:40px; font-size:16px; color:#009fe3; font-weight:bold; background:url(/themes/images/v3/btn.png) center center no-repeat;
        -moz-border-radius:6px;
        -khtml-border-radius:6px;
        -webkit-border-radius:6px;
        border-radius:6px;
    }
</style>
</head>
<body>
    <div id="header">
        <div class="header">
            <h2><物联网> 资源代理平台</h2>
            <!-- <h1 class="png_bg"><?=$this->session->config->title?></h1> -->
            <!-- <a href="#">返回主页</a> -->
        </div>
    </div>

    <div class="login_bg">
        <div class="form">
            <div class="loginad">
                <div class="loginadtitle"><物联网> 资源代理平台 上线了!!</div>
                <div class="loginaddes">提供各种网络产品购买和发布，做网站再也不用去联系各种外包团队了</div>
                <!-- <div class="loginadbtn"><a  href="docs/api/id/59" target="_blank">马上查看</a></div> -->
                <!-- <div class="loginadimg" style="background:url('http://img.juhe.cn/www/news/201407/3275043504%20.png') center center no-repeat"></div> -->
            </div>

            <form name="loginForm" id="login_form" method="post" action="<?=site_url('welcome/login') ?>">
                <h2><?=$this->session->config->title?>登录</h2>
                <div class="div_user"><span></span><input  name="username" class="username" type="text" placeholder="用户名" /></div>
                <div class="div_pw"><span></span><input class="pw" name="password" type="password" placeholder="密码" /></div>
                <div class="div_pw"><span></span><input class="pw" name="cap" type="text" placeholder="验证码" /></div>
                <div class="div_pw">
                    <label onclick="reset_cap()" title="点击刷新验证码" id="cap"><?=$cap['image']?></label>
                    <!-- <label><input type="checkbox" class="" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;下次自动登录</label>
                    <a class="forgetPw" href="forget">忘记密码？</a> -->
                </div>
                <div style="margin-top: 20px"><input class="login_btn" id="loginBtn" type="submit" value="登录" /></div>
                <div style="line-height:30px; text-indent:5px;color:#F30" id="loginTips">&nbsp;</div>
                <!-- <h4>可以使用下面方式登录<a class="#" href="register">立即注册</a></h4>
                <a href="#"><img src="themes/images/oauth/csdn.png" alt="" /></a> -->
            </form>
        </div>
    </div>


<!-- footer start -->
<div id="footer" class="clear">
    <!-- <div class="friendLink clear">
        <a  href="#" target="_blank" title="隐私政策" rel="nofollow">隐私政策</a>
        <a href="#" target="_blank" rel="nofollow">服务条款</a>
        <a href="#" target="_blank" rel="nofollow">关于我们</a>
        <a href="#" target="_blank" rel="nofollow">人员招聘</a>
        <a href="#" target="_blank" rel="nofollow">联系我们</a>
        <a href="#" target="_blank" rel="nofollow">友情链接</a>
    </div> -->
    <p>重庆物联网科技有限公司©版权所有 渝ICP备14009151号-2</p>
    <div class="weixin">
        <img src="" alt="手机端登录" id="login" onclick="open_view()" />
        <h3>手机端登录</h3>
    </div>
</div>
<!-- footer end -->
<script type="text/javascript">
    function reset_cap(){
        $.get("<?=site_url('welcome/reset_cap')?>",function(res){
            $("#cap").html(res);
        });
    }

    $('#login_form').submit(function() {
        var index = layer.load(2);
        $(this).ajaxSubmit(function(data){
            layer.close(index);
            if(data == 1){
                location.href="<?php site_url('home/index')?>";
            }else{
                reset_cap();
                layer.alert(data,{
                    icon:2,
                });
            }
        })
        return false;
    })

    function open_view(){
        var data = $("#login").attr('src');
        layer.open({
            type: 1,
            title: false,
            closeBtn: false,
            shadeClose: true,
            area: ['492px', '492px'],
            skin: 'yourclass',
            content: "<img style='width:487px;height:487px' src='"+data+"' />"
        });
    }

    $(function(){
        $.post("<?=site_url('qrcode/create')?>",{content:'<?=site_url("welcome/index")?>'},function(data){
            $("#login").attr('src',data);
        });
    })
</script>
</body>
</html>
